{# empty Twig template #}
{% extends'CNAMActimanBundle::layoutBody.html.twig' %}
{% block body %}
    
    {% block content %}
        <div class="col-lg-12">
            <h2>Liste des services</h2>
            <hr align="center" width="90%" size="5">
            <div class="col-lg-12">
                {% for service in list_service %}
                    <div class="panel panel-primary">              
                        <div class="panel-heading">
                            <h3 class="panel-title">
                                {{ service.nomService }}
                            </h3>
                        </div>
                        <div class="panel-body">
                            {% for user in list_user %}
                            {% if user.Service.id == service.id %}
                            <div class="panel panel-info">
                                <div class="panel-heading">
                                    <h3 class="panel-title">{{ user.nomUser }} {{ user.prenomUser }}</h3>
                                </div>
                                <div class="panel-body">
                                    <div class="table-responsive">
                                        <table class="table table-bordered table-hover table-striped tablesorter">  
                                            <thead>
                                                <tr>
                                                    <th width="26%">Tâche affectée <i class="fa fa-sort"></i></th>
                                                    <th width="12%">Avancement <i class="fa fa-sort"></i></th>
                                                    <th width="26%">Phase associée <i class="fa fa-sort"></i></th>
                                                    <th width="26%">Procédure associée <i class="fa fa-sort"></i></th>   
                                                    <th width="10%"><center>Détail </center></th>
                                                </tr>
                                            </thead>
                                            <tbody>
                                                {% for tache in list_tache %}
                                                {% if tache.user.id == user.id %}
                                                <tr>
                                                    <td>{{ tache.nomTache }}</td>
                                                    <td>{{ tache.avancementTache }} %</td>
                                                    <td>{{ tache.phasePlanifiee.Phase.nomPhase }}</td>
                                                    <td>{{ tache.phasePlanifiee.procedurePlanifiee.acProcedure.nomProcedure }}</td>                                
                                                    <td><center><a href="{{ path('cnam_actiman_control_menuVisualiserAgent', {'idtache':tache.id, 'iduser':tache.user.id}) }}"><i class="fa fa-eye"> Visualiser</i></a></center></td>
                                                </tr> 
                                                {% endif %}
                                                {% endfor %}
                                            </tbody>
                                        </table>
                                    </div>
                                </div>
                            </div>
                        {% endif %}
                        {% endfor %}    
                        </div>  
                    </div>
                {% endfor %}
            </div>
        </div>   
    {% endblock%}
    
{% endblock%}{# empty Twig template #}
